package day03;

public class OperDemo3 {
    //条件运算符：三目运算符
    public static void main(String[] args) {
        int num = 5;
        int flag = num > 0 ? 1 : -1;
        System.out.println(flag); //1

        int a = 10,b=20;
        int max = a > b ? a : b;
        System.out.println("最大值是" + max);
    }
}
